import redis
from flask import current_app


class RedisTool:
    rds = None

    def __init__(self):
        host = current_app.config["REDIS_HOST"]
        port = current_app.config["REDIS_PORT"]
        password = current_app.config["REDIS_PASSWORD"]
        self.rds = redis.Redis(host=host, port=port, password=password)
